<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>

<script src="../js/vue.js"></script>
<div id="app">
  <cpn></cpn>
  <cpn>
    <!--这里的template标签目的是为了获得子组件的pLaguages-->
    <template slot-scope="slot">
      <span >{{slot.abc.join(" * ")}}</span>n
    </template>

  </cpn>
  <cpn></cpn>
</div>
<template id="cpn">
  <div>
    <slot :abc="pLanguages">
      <ul>
        <li v-for="item in pLanguages">{{item}}</li>
      </ul>
    </slot>
  </div>
</template>
<script>
    const app = new Vue({
        el:'#app',
        data:{
            message:"第一次，系统的学VUE"
        },
      components:{
          cpn:{
            template:`#cpn`,
            data(){
              return{
                pLanguages:['java','javaScript','c++','php']
              }
            }
          }
      }
    })
</script>
</body>
</html>